<template>
    <div class="home-container">
      <h1>欢迎来到售后服务平台</h1>
      <p v-if="!userStore.isLoggedIn">请<router-link to="/auth">登录</router-link>或<router-link to="/auth">注册</router-link>以继续。</p>
      <p v-else>您已登录为 {{ userStore.username }} ({{ userStore.role === 'ADMIN' ? '管理员' : '用户' }})。</p>
    </div>
  </template>
  
  <script setup>
  import { useUserStore } from '../stores/user'
  const userStore = useUserStore()
  </script>
  
  <style scoped>
  .home-container {
    text-align: center;
    padding: 50px;
  }
  </style>